// main.c -- Defines the C-code kernel entry point, calls initialisation routines.
// Made for JamesM's tutorials

#include "common.h"
#include "clock.h"
#include "descriptor_tables.h"
#include "paging.h"

int main(struct multiboot *mboot_ptr)
{
  int a = 10;
  int b = 1231;
  clear();
  printk("%d: %x\n %d: %x\n", a, &a, b, &b); 
  printk("Initializing...\n");
  printk("Now Setting up GDT...\n");
  init_descriptor_tables();
  printk("GDT Set up...\n");
  int c = 123;
  int d = 12;
  printk("%d: %x\n %d: %x\n", c, &c, d, &d); 
  
  
  init_paging();
  printk("Hello! Paging World! ");
  
  uint *ptr = (uint *)0xA0000000;
  uint do_page_fault = *ptr;
  
  while(1);
  
  return 0xDEADBABA;
} 
